﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using IP.Core.IPBusinessService;
using IP.Core.IPCommon;
using IP.Core.IPData;
using IP.Core.IPUserService;
using WebDS;
using WebDS.CDBNames;
using WebUS;
using System.Data;

public partial class DanhMuc_US601_Danh_muc_tai_lieu_dc_su_dung : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {

            if (Request.QueryString["id_use"] != null)
            {
                load_data_to_list_tai_lieu(CIPConvert.ToDecimal(Request.QueryString["id_use"]));                
            }            
            else
            {
                US_V_DM_NHAN_VIEN v_us = new US_V_DM_NHAN_VIEN();
                v_us.Get_us_by_ten_truy_cap(Session["UserName"].ToString());
                load_data_to_list_tai_lieu(v_us.dcID);
            }
        }
    }
    #region Members
    DS_CM_DM_TU_DIEN v_ds_dm_tai_lieu = new DS_CM_DM_TU_DIEN();
    US_DM_PHAN_QUYEN_TAI_LIEU v_us_dm_tai_lieu = new US_DM_PHAN_QUYEN_TAI_LIEU();
    #endregion

    #region Data Structures

    #endregion

    #region Public Methods

    #endregion

    #region Private Methods
    private void load_data_to_list_tai_lieu(decimal ip_id_use)
    {
        v_us_dm_tai_lieu.filldataset_tu_dien_by_user(ip_id_use, v_ds_dm_tai_lieu);
        m_list_dm_tai_lieu.DataSource = v_ds_dm_tai_lieu.CM_DM_TU_DIEN;
        m_list_dm_tai_lieu.DataBind();
    }
    #endregion

    #region Events

    #endregion    
}